<?php
/**
 * Created by PhpStorm.
 * User: hcadmin
 * Date: 16/8/25
 * Time: 上午9:59
 */
?>
<script>
    $(function(){
        $(window).scroll(function(){
            $offset = $('.placeholder').offset();//不能用自身的div，不然滚动起来会很卡
            if($(window).scrollTop()>100){
                $('.header-menu').css({
                    'position':'fixed',
                    'top':'0px',
//                    'left':$offset.left+'px',
                    'z-index':'999',
                    'margin':'auto',
                    'width':'100%',
                    'background':'#2b2b2b',
                    'min-width':'1180px'
                });
                $(".logo").css({
                    'padding-left':'170px'
                })
            }else{

                $('.logo').removeAttr('style');
                $('.header-menu').removeAttr('style');
            }
        });
    });
</script>
